package com.yami.shop.webservice.common.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yami.shop.bean.model.TransferTokenRecord;
import com.yami.shop.common.util.PageParam;
import com.yami.shop.webservice.common.dao.TransferTokenRecordMapper;
import com.yami.shop.webservice.common.service.TransferTokenRecordService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *
 *
 * @author zhangchaoqun
 * @date 2021-10-13
 */
@Service
public class TransferTokenRecordServiceImpl implements TransferTokenRecordService
{
    private final Logger log = LoggerFactory.getLogger(this.getClass());

    @Autowired
    private TransferTokenRecordMapper transferTokenRecordMapper;


    @Override
    public void save(TransferTokenRecord transferTokenRecord) {
        transferTokenRecordMapper.save(transferTokenRecord);
    }
    @Override
    public void saveBatch(List<TransferTokenRecord> list) {
        transferTokenRecordMapper.saveBatch(list);
    }
    @Override
    public void updateByPrimaryKeySelective(TransferTokenRecord transferTokenRecord) {
        transferTokenRecordMapper.updateByPrimaryKeySelective(transferTokenRecord);
    }

    @Override
    public TransferTokenRecord selectByTokenId(String tokenId,Integer type) {
        return transferTokenRecordMapper.selectByTokenId(tokenId,type);
    }

    @Override
    public List<TransferTokenRecord> selectListByTokenId(List<String> tokenIds, Integer type) {
        return transferTokenRecordMapper.selectListByTokenId(tokenIds,type);
    }

    @Override
    public void updateBatch(List<TransferTokenRecord> list) {
         transferTokenRecordMapper.updateBatch(list);
    }
    @Override
    public void updateBatchByBatchIdAndStatus(List<Long> batchIds, Integer status) {
        transferTokenRecordMapper.updateBatchByBatchIdAndStatus(batchIds,status);
    }

    @Override
    public void deteleBatchByBatchIds(List<Long> batchIds) {
        transferTokenRecordMapper.deteleBatchByBatchIds(batchIds);
    }
    @Override
    public List<TransferTokenRecord> selectListByBatchId(Long batchId) {
        return transferTokenRecordMapper.selectListByBatchId(batchId);
    }

    @Override
    public IPage<TransferTokenRecord> getPage(PageParam<TransferTokenRecord> page, TransferTokenRecord param) {
        IPage<TransferTokenRecord> pageVO = transferTokenRecordMapper.getPage(page, param);
        return pageVO;
    }

    @Override
    public IPage<TransferTokenRecord> getCollectPage(PageParam<TransferTokenRecord> page, TransferTokenRecord param) {
        IPage<TransferTokenRecord> pageVO = transferTokenRecordMapper.getCollectPage(page, param);
        return pageVO;
    }
}
